import java.util.Scanner;

public class Demo2 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        //在此输入您的代码...
        long n = scan.nextLong();
        long num = 1;
        long i = 1;
        for ( ; num < n; i++) {
            num *= i;
        }
        System.out.println(i - 1);
        scan.close();
    }
}
